/*
 * Copyright (C) 2024 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
#include "mock_arf_manager.h"
#include "secure_element_agent.h"
#include "arf_manager.h"
 
namespace OHOS {
namespace SE {
bool ArfManager::Initialize(std::weak_ptr<SecureElementAgent> seAgent)
{
    return true;
}
std::string ArfManager::GetUsedSeName()
{
    return "";
}
void ArfManager::SetUsedSeName(const std::string &seName)
{
    usedSeName_ = seName;
}
std::vector<uint8_t> ArfManager::TransmitArfApdu(std::shared_ptr<EfParser> ef, const std::vector<uint8_t> &cmd)
{
    std::vector<uint8_t> data = {0x01, 0x62, 0x03, 0x04, 0x05, 0x06, 0x04,
        0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, 0x00};
    return data;
}
void ArfManager::CloseArfChannel()
{
    return;
}
std::vector<uint8_t> ArfManager::GetRefreshTag()
{
    return std::vector<uint8_t> {};
}

void ArfManager::SetRefreshTag(const std::vector<uint8_t> &refreshTag)
{
    return;
}

void ArfManager::AddArfRule(std::shared_ptr<AidRefDo> aidRefDo,
    std::shared_ptr<DeviceAppIdRefDo> deviceAppIdRefDo, bool isAllowed)
{
    return;
}
std::vector<std::shared_ptr<RefArDo>> ArfManager::GetArfRule()
{
    std::vector<std::shared_ptr<RefArDo>> accessRuleVec;
    std::vector<uint8_t> rawData;
    std::shared_ptr<RefArDo> refArDo = std::make_shared<RefArDo>(rawData);
    accessRuleVec.push_back(refArDo);
    return accessRuleVec;
}
void ArfManager::ClearArfRules()
{
    return;
}

void ArfManager::AddArfRule(std::shared_ptr<RefDo> refDo, bool isAllowed)
{
    return;
}

int32_t ArfManager::TransmitArfApduBySimIO(
    int fileId, const std::vector<uint8_t> &filePath, const std::vector<uint8_t> &cmd, std::string &rsp)
{
    return 0;
}
} // SE
} // OHOS